package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.Kehu;
import cn.gson.boot.model.pojos.User;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface HTDDUserDao extends CrudRepository<User,Integer> {
    //查询所有的员工
    @Query(nativeQuery = true,value = "select * from user_")
    public List<User> selectUser();

    //根据员工名称来查员工id
    @Query(nativeQuery = true,value = "select * from user_ where emp_name = ?1")
    public User selectEmpid(String empName);


   /* @Query("select k.kName from Kehu k")
    public List<Kehu> selectKehu();*/
}
